$def with(send_success = False, tour = None, sub_success = False)
$:render.test.header()

<div class="main2">
    <div class="test pac">
        $if sub_success:
            <span class="blue">订阅成功。</span>
        $elif send_success:
            <span class="blue">结果发送成功，请赶快到您的微博看吧。</span><br />
            $if tour and tour.plan_dest:
                <script type="text/javascript" src="/static/scripts/libs/jquery.js"></script>
                <script type="text/javascript">
                    function check_form() {
                        var el = $$('#email');
                        if (el.val() == '' || el.val() == '输入email订阅') {
                            alert('请输入您的email地址。');
                            return false;
                        }
                        if (!el.val().match(/^(\w)+(\.\w+)*@(\w)+((\.\w+)+)$$/gi)) {
                            alert('您输入的Email格式有误。');
                            return false;
                        }
                    
                    };
                </script>
                <form method="post" onsubmit="return check_form();">
                <input type="hidden" name="sub" value="1" />
                <div style="color:#fff;">想第一时间获知 $tour.plan_dest
                    旅游的特惠/促销情报吗？<input type="text" value="输入email订阅" onfocus="if(this.value == '输入email订阅'){this.value = '';}" onblur="if(this.value==''){this.value = '输入email订阅';}" name="email" id="email" />&nbsp;<input type="submit" value="免费订阅" /></div>
                <div style="font-size:12px;">寻宝图是独立的第三方旅游评估推荐网站，每周发送一次TOP10超值旅游情报。您可随时取消订阅。</div>
                </form>
        $else:
            <form method="post">
            <span class="blue">测试成功，请点击下方按钮发送微博查看结果</span>
            <div class="txt_btn">
                <!--<div class="txt_r"><input name="" type="checkbox" value="" />同时关注喷群旅行微博</div>-->
                <div class="txt_l"><input type="image" src="/static/test/images/btn_send.gif" width="192" height="32" alt="发送微博查看结果" /></div>
            </div>
            </form>
     </div>
 </div>
<div class="main2_b"></div>

$:render.test.footer()
